home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / 3d2split / form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-09-06  |  20.1 KB  |  609 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Example of 3D routines and splitter bars"
  6.    ClientHeight    =   4710
  7.    ClientLeft      =   885
  8.    ClientTop       =   1515
  9.    ClientWidth     =   7575
  10.    Height          =   5115
  11.    Left            =   825
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   4710
  14.    ScaleWidth      =   7575
  15.    Top             =   1170
  16.    Width           =   7695
  17.    Begin PictureBox Picture2 
  18.       Height          =   432
  19.       Left            =   4860
  20.       Picture         =   FORM1.FRX:0000
  21.       ScaleHeight     =   405
  22.       ScaleWidth      =   405
  23.       TabIndex        =   15
  24.       Top             =   4500
  25.       Visible         =   0   'False
  26.       Width           =   432
  27.    End
  28.    Begin PictureBox PBottom 
  29.       BackColor       =   &H00C0C0C0&
  30.       BorderStyle     =   0  'None
  31.       Height          =   720
  32.       Left            =   0
  33.       ScaleHeight     =   720
  34.       ScaleWidth      =   7575
  35.       TabIndex        =   10
  36.       Top             =   3988
  37.       Width           =   7576
  38.       Begin PictureBox PMenu 
  39.          BackColor       =   &H00C0C0C0&
  40.          BorderStyle     =   0  'None
  41.          Height          =   480
  42.          Left            =   120
  43.          ScaleHeight     =   480
  44.          ScaleWidth      =   7320
  45.          TabIndex        =   11
  46.          Top             =   120
  47.          Width           =   7320
  48.          Begin CommandButton B_Colors 
  49.             Caption         =   "Colors"
  50.             Height          =   360
  51.             Left            =   60
  52.             TabIndex        =   9
  53.             Top             =   60
  54.             Width           =   1200
  55.          End
  56.          Begin CommandButton B_Exit 
  57.             Caption         =   "Exit"
  58.             Height          =   360
  59.             Left            =   6060
  60.             TabIndex        =   14
  61.             Top             =   60
  62.             Width           =   1200
  63.          End
  64.          Begin PictureBox PStatus 
  65.             BackColor       =   &H00C0C0C0&
  66.             BorderStyle     =   0  'None
  67.             Height          =   360
  68.             Left            =   1380
  69.             ScaleHeight     =   360
  70.             ScaleWidth      =   4560
  71.             TabIndex        =   12
  72.             Top             =   60
  73.             Width           =   4560
  74.             Begin Label Status 
  75.                Alignment       =   2  'Center
  76.                BackColor       =   &H00C0C0C0&
  77.                Caption         =   "Help/Status bar"
  78.                FontBold        =   0   'False
  79.                FontItalic      =   0   'False
  80.                FontName        =   "MS Sans Serif"
  81.                FontSize        =   8.25
  82.                FontStrikethru  =   0   'False
  83.                FontUnderline   =   0   'False
  84.                Height          =   240
  85.                Left            =   0
  86.                TabIndex        =   13
  87.                Top             =   60
  88.                Width           =   4440
  89.             End
  90.          End
  91.       End
  92.    End
  93.    Begin TextBox RText 
  94.       BackColor       =   &H00FFFFFF&
  95.       Height          =   1800
  96.       Left            =   3840
  97.       MultiLine       =   -1  'True
  98.       TabIndex        =   8
  99.       Text            =   "As the mouse pointer enters a control, the status/help bar shows the corresponding help line."
  100.       Top             =   2040
  101.       Width           =   3600
  102.    End
  103.    Begin TextBox LText 
  104.       BackColor       =   &H00FFFFFF&
  105.       Height          =   1800
  106.       Left            =   120
  107.       MultiLine       =   -1  'True
  108.       TabIndex        =   7
  109.       Text            =   "The two picture boxes and the two text boxes are resized when you drag one of the five splitters.  Please read the comments in 3D2.BAS (declarations section)."
  110.       Top             =   2040
  111.       Width           =   3600
  112.    End
  113.    Begin PictureBox C 
  114.       BackColor       =   &H000000FF&
  115.       BorderStyle     =   0  'None
  116.       Height          =   96
  117.       Left            =   3732
  118.       MousePointer    =   8  'Size NW SE
  119.       ScaleHeight     =   90
  120.       ScaleWidth      =   90
  121.       TabIndex        =   6
  122.       Top             =   1932
  123.       Width           =   96
  124.    End
  125.    Begin PictureBox HR 
  126.       BackColor       =   &H0000FF00&
  127.       BorderStyle     =   0  'None
  128.       Height          =   96
  129.       Left            =   3840
  130.       MousePointer    =   7  'Size N S
  131.       ScaleHeight     =   90
  132.       ScaleWidth      =   3615
  133.       TabIndex        =   5
  134.       Top             =   1932
  135.       Width           =   3612
  136.    End
  137.    Begin PictureBox HL 
  138.       BackColor       =   &H0000FF00&
  139.       BorderStyle     =   0  'None
  140.       Height          =   96
  141.       Left            =   108
  142.       MousePointer    =   7  'Size N S
  143.       ScaleHeight     =   90
  144.       ScaleWidth      =   3615
  145.       TabIndex        =   3
  146.       Top             =   1932
  147.       Width           =   3612
  148.    End
  149.    Begin PictureBox VT 
  150.       BackColor       =   &H0000FFFF&
  151.       BorderStyle     =   0  'None
  152.       Height          =   1824
  153.       Left            =   3732
  154.       MousePointer    =   9  'Size W E
  155.       ScaleHeight     =   1830
  156.       ScaleWidth      =   90
  157.       TabIndex        =   2
  158.       Top             =   108
  159.       Width           =   96
  160.    End
  161.    Begin PictureBox LPict 
  162.       BackColor       =   &H00C0C0C0&
  163.       Height          =   1800
  164.       Left            =   120
  165.       ScaleHeight     =   1770
  166.       ScaleWidth      =   3570
  167.       TabIndex        =   1
  168.       Tag             =   "List of target language sentences"
  169.       Top             =   120
  170.       Width           =   3600
  171.    End
  172.    Begin PictureBox RPict 
  173.       BackColor       =   &H00C0C0C0&
  174.       Height          =   1800
  175.       Left            =   3840
  176.       ScaleHeight     =   1770
  177.       ScaleWidth      =   3570
  178.       TabIndex        =   0
  179.       Tag             =   "List of target language sentences"
  180.       Top             =   120
  181.       Width           =   3600
  182.    End
  183.    Begin PictureBox VB 
  184.       BackColor       =   &H0000FFFF&
  185.       BorderStyle     =   0  'None
  186.       Height          =   1824
  187.       Left            =   3732
  188.       MousePointer    =   9  'Size W E
  189.       ScaleHeight     =   1830
  190.       ScaleWidth      =   90
  191.       TabIndex        =   4
  192.       Top             =   2028
  193.       Width           =   96
  194.    End
  195. Option Explicit
  196. Dim tx As Integer     ' TwipsPerPixelX
  197. Dim ty As Integer     ' TwipsPerPixelY
  198. Dim MinL As Integer   ' Limits to splitters' positions
  199. Dim MaxR As Integer
  200. Dim MinT As Integer
  201. Dim MaxB As Integer
  202. Dim OKtoDraw As Integer      ' Flag to indicate the rectangle should be drawn
  203. Dim Vrct As RECT             ' Vertical outline structure
  204. Dim Hrct As RECT             ' Horizontal outline structure
  205. Dim SplitInitLeft As Integer ' Initial values for MouseMove
  206. Dim InitX As Integer
  207. Dim SplitInitTop As Integer
  208. Dim InitY As Integer
  209. Sub B_Colors_Click ()
  210.     If C.BackColor = RED Then
  211.         C.BackColor = LIGHTGRAY
  212.         HL.BackColor = LIGHTGRAY
  213.         HR.BackColor = LIGHTGRAY
  214.         VT.BackColor = LIGHTGRAY
  215.         VB.BackColor = LIGHTGRAY
  216.     Else
  217.         C.BackColor = RED
  218.         HL.BackColor = GREEN
  219.         HR.BackColor = GREEN
  220.         VT.BackColor = YELLOW
  221.         VB.BackColor = YELLOW
  222.     End If
  223. End Sub
  224. Sub B_Colors_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  225.     Status = "B_Colors help"
  226. End Sub
  227. Sub B_Exit_Click ()
  228.     Unload Me
  229. End Sub
  230. Sub B_Exit_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  231.     Status = "B_Exit help"
  232. End Sub
  233. Sub C_DblClick ()
  234.     ' This is to compensate for the extra MouseUp event that
  235.     ' is triggered when the user doubleclicks on the splitter.
  236.     ' (The rectangle must be drawn an even number of times.)
  237.     DrawOutline Vrct, Me
  238.     DrawOutline Hrct, Me
  239. End Sub
  240. Sub C_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  241.     OKtoDraw = True ' Paintbrush on.
  242.     Hrct.Left = HL.Left
  243.     Hrct.Top = HL.Top
  244.     Hrct.right = Hrct.Left + HL.Width + C.Width + HR.Width
  245.     Hrct.bottom = Hrct.Top + HL.Height
  246.     DrawOutline Hrct, Me
  247.     SplitInitTop = HL.Top
  248.     InitY = Y
  249.     Vrct.Left = VT.Left
  250.     Vrct.Top = VT.Top
  251.     Vrct.right = Vrct.Left + VT.Width
  252.     Vrct.bottom = Vrct.Top + VT.Height + C.Height + VB.Height
  253.     DrawOutline Vrct, Me
  254.     SplitInitLeft = VT.Left
  255.     InitX = X
  256. End Sub
  257. Sub C_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  258.     Status = "C help"
  259.     If OKtoDraw Then
  260.         DrawOutline Hrct, Me
  261.         Hrct.Top = SplitInitTop + Y - InitY
  262.         If Hrct.Top < MinT Then Hrct.Top = MinT
  263.         If Hrct.Top > MaxB Then Hrct.Top = MaxB
  264.         Hrct.bottom = Hrct.Top + HL.Height
  265.         DrawOutline Hrct, Me
  266.         DrawOutline Vrct, Me
  267.         Vrct.Left = SplitInitLeft + X - InitX
  268.         If Vrct.Left < MinL Then Vrct.Left = MinL
  269.         If Vrct.Left > MaxR Then Vrct.Left = MaxR
  270.         Vrct.right = Vrct.Left + VT.Width
  271.         DrawOutline Vrct, Me
  272.     End If
  273. End Sub
  274. Sub C_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  275.     DrawOutline Hrct, Me
  276.     DrawOutline Vrct, Me
  277.     OKtoDraw = False
  278.     HL.Top = Hrct.Top
  279.     HR.Top = HL.Top
  280.     C.Top = HL.Top
  281.     VT.Height = HL.Top - VT.Top
  282.     VB.Top = HL.Top + HL.Height
  283.     VB.Height = VB.Height + SplitInitTop - HL.Top
  284.     VT.Left = Vrct.Left
  285.     VB.Left = VT.Left
  286.     C.Left = VT.Left
  287.     HL.Width = VT.Left - HL.Left
  288.     HR.Width = HR.Width + SplitInitLeft - VT.Left
  289.     HR.Left = VT.Left + VT.Width
  290.     ReSizeMe
  291.     OutlineControl Me, LText, 1, -1
  292.     OutlineControl Me, RText, 1, -1
  293.     OutlineControl Me, LPict, 1, -1
  294.     OutlineControl Me, RPict, 1, -1
  295. End Sub
  296. Sub Form_Load ()
  297.     tx = screen.TwipsPerPixelX
  298.     ty = screen.TwipsPerPixelY
  299.     MinL = 1200
  300.     MaxR = Me.Width - 1200
  301.     MinT = 1200
  302.     MaxB = Me.Height - 2200
  303.     Me.Width = 7600
  304.     Me.Height = 5040
  305.     PBottom.Width = Me.Width - 2 * tx
  306.     PBottom.Top = Me.Height - PBottom.Height - 348
  307.     PStatus.Width = Me.Width - 3040
  308.     Status.Width = Me.Width - 3160
  309.     ' Fine-tune the splitters' initial position
  310.     ' This is necessary to accomodate different screen resolutions
  311.     VT.Top = 120 - ty
  312.     VT.Height = 1800 + 2 * ty
  313.     VT.Width = 120 - 2 * tx
  314.     VT.Left = 120 + 3600 + tx
  315.     C.Top = VT.Top + VT.Height
  316.     C.Height = 120 - 2 * ty
  317.     C.Width = VT.Width
  318.     C.Left = VT.Left
  319.     VB.Top = C.Top + C.Height
  320.     VB.Height = VT.Height
  321.     VB.Width = VT.Width
  322.     VB.Left = VT.Left
  323.     HL.Top = 120 + 1800 + ty
  324.     HL.Height = 120 - 2 * ty
  325.     HL.Width = 3600 + 2 * tx
  326.     HL.Left = 120 - tx
  327.     HR.Top = HL.Top
  328.     HR.Height = HL.Height
  329.     HR.Width = HL.Width
  330.     HR.Left = C.Left + C.Width
  331.     LPict.Picture = Picture2.Picture
  332.     RPict.Picture = Picture2.Picture
  333.     CenterForm Me
  334. End Sub
  335. Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  336.     Status = "Form help"
  337. End Sub
  338. Sub Form_Paint ()
  339.     OutlineForm Me, 1, raised
  340.     InLinePic PBottom, 2, raised
  341.     OutlineControl Me, LText, 1, -1
  342.     OutlineControl Me, RText, 1, -1
  343.     OutlineControl Me, LPict, 1, -1
  344.     OutlineControl Me, RPict, 1, -1
  345.     OutlineControlPic PBottom, PMenu, 1, -1
  346.     OutlineControlPic PMenu, B_Colors, 1, -1
  347.     OutlineControlPic PMenu, B_Exit, 1, -1
  348.     OutlineControlPic PMenu, PStatus, 1, -1
  349.     'OutlinePicOnPic PMenu, PStatus, INSET
  350. End Sub
  351. Sub Form_Resize ()
  352.     MinL = 1200
  353.     MaxR = Me.Width - 1200
  354.     MinT = 1200
  355.     MaxB = Me.Height - 2200
  356.     Dim Disp As Integer
  357.     If WindowState = MAXI Then
  358.         OutlineControl Me, PMenu, 1, 2
  359.     End If
  360.     If WindowState = NORMAL Then     ' Check for splitters out of bounds
  361.         If VT.Left > MaxR Then
  362.             Disp = VT.Left - MaxR
  363.             VT.Left = MaxR
  364.             C.Left = MaxR
  365.             VB.Left = MaxR
  366.             HR.Left = HR.Left - Disp
  367.             HR.Width = HR.Width + Disp
  368.             HL.Width = HL.Width - Disp
  369.         End If
  370.         If HL.Top > MaxB Then
  371.             Disp = HL.Top - MaxB
  372.             HL.Top = MaxB
  373.             C.Top = MaxB
  374.             HR.Top = MaxB
  375.             VB.Top = VB.Top - Disp
  376.             VB.Height = VB.Height + Disp
  377.             VT.Height = VT.Height - Disp
  378.         End If
  379.     End If
  380.     InLinePic PBottom, 2, remove
  381.     SizeMe
  382.     Me.Refresh
  383. End Sub
  384. Sub HL_DblClick ()
  385.     ' This is to compensate for the extra MouseUp event that
  386.     ' is triggered when the user doubleclicks on the splitter.
  387.     ' (The rectangle must be drawn an even number of times.)
  388.     DrawOutline Hrct, Me
  389. End Sub
  390. Sub HL_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  391.     OKtoDraw = True
  392.     Hrct.Left = HL.Left
  393.     Hrct.Top = HL.Top
  394.     Hrct.right = Hrct.Left + HL.Width + C.Width + HR.Width
  395.     Hrct.bottom = Hrct.Top + HL.Height
  396.     DrawOutline Hrct, Me
  397.     SplitInitTop = HL.Top
  398.     InitY = Y
  399. End Sub
  400. Sub HL_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  401.     Status = "HL help"
  402.     If OKtoDraw Then
  403.         DrawOutline Hrct, Me
  404.         Hrct.Top = SplitInitTop + Y - InitY
  405.         If Hrct.Top < MinT Then Hrct.Top = MinT
  406.         If Hrct.Top > MaxB Then Hrct.Top = MaxB
  407.         Hrct.bottom = Hrct.Top + HL.Height
  408.         DrawOutline Hrct, Me
  409.     End If
  410. End Sub
  411. Sub HL_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  412.     DrawOutline Hrct, Me
  413.     OKtoDraw = False
  414.     HL.Top = Hrct.Top
  415.     HR.Top = HL.Top
  416.     C.Top = HL.Top
  417.     VT.Height = HL.Top - VT.Top
  418.     VB.Top = HL.Top + HL.Height
  419.     VB.Height = VB.Height + SplitInitTop - HL.Top
  420.     ReSizeMe
  421.     OutlineControl Me, LText, 1, -1
  422.     OutlineControl Me, RText, 1, -1
  423.     OutlineControl Me, LPict, 1, -1
  424.     OutlineControl Me, RPict, 1, -1
  425. End Sub
  426. Sub HR_DblClick ()
  427.     ' This is to compensate for the extra MouseUp event that
  428.     ' is triggered when the user doubleclicks on the splitter.
  429.     ' (The rectangle must be drawn an even number of times.)
  430.     DrawOutline Hrct, Me
  431. End Sub
  432. Sub HR_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  433.     OKtoDraw = True
  434.     Hrct.Left = HL.Left
  435.     Hrct.Top = HL.Top
  436.     Hrct.right = Hrct.Left + HL.Width + C.Width + HR.Width
  437.     Hrct.bottom = Hrct.Top + HL.Height
  438.     DrawOutline Hrct, Me
  439.     SplitInitTop = HL.Top
  440.     InitY = Y
  441. End Sub
  442. Sub HR_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  443.     Status = "HR help"
  444.     If OKtoDraw Then
  445.         DrawOutline Hrct, Me
  446.         Hrct.Top = SplitInitTop + Y - InitY
  447.         If Hrct.Top < MinT Then Hrct.Top = MinT
  448.         If Hrct.Top > MaxB Then Hrct.Top = MaxB
  449.         Hrct.bottom = Hrct.Top + HL.Height
  450.         DrawOutline Hrct, Me
  451.     End If
  452. End Sub
  453. Sub HR_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  454.     DrawOutline Hrct, Me
  455.     OKtoDraw = False
  456.     HL.Top = Hrct.Top
  457.     HR.Top = HL.Top
  458.     C.Top = HL.Top
  459.     VT.Height = HL.Top - VT.Top
  460.     VB.Top = HL.Top + HL.Height
  461.     VB.Height = VB.Height + SplitInitTop - HL.Top
  462.     ReSizeMe
  463.     OutlineControl Me, LText, 1, -1
  464.     OutlineControl Me, RText, 1, -1
  465.     OutlineControl Me, LPict, 1, -1
  466.     OutlineControl Me, RPict, 1, -1
  467. End Sub
  468. Sub LPict_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  469.     Status = "LPict help"
  470. End Sub
  471. Sub LText_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  472.     Status = "LText help"
  473. End Sub
  474. Sub PMenu_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  475.     Status = "PMenu help"
  476. End Sub
  477. Sub ReSizeMe ()
  478.     ' Resize control when splitters have moved (in MouseUp)
  479.     ' H size and position
  480.     LPict.Width = VT.Left - tx - 120
  481.     RPict.Left = VT.Left + 120 - tx
  482.     RPict.Width = Me.Width - RPict.Left - 160
  483.     LText.Width = LPict.Width
  484.     RText.Width = RPict.Width
  485.     RText.Left = RPict.Left
  486.     ' V size and position
  487.     LPict.Height = VT.Height - 2 * ty
  488.     RPict.Height = LPict.Height
  489.     LText.Top = VB.Top + ty
  490.     LText.Height = Me.Height - LText.Top - 1200
  491.     RText.Top = LText.Top
  492.     RText.Height = LText.Height
  493. End Sub
  494. Sub RPict_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  495.     Status = "RPict help"
  496. End Sub
  497. Sub RText_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  498.     Status = "RText help"
  499. End Sub
  500. Sub SizeMe ()
  501.     ' Size controls when Max/Minimize button is pressed
  502.     If WindowState = MINI Then Exit Sub   ' Minimized
  503.     VB.Height = Me.Height - VB.Top - 1188
  504.     HR.Width = Me.Width - HR.Left - 148
  505.     PBottom.Top = Me.Height - 1068
  506.     PBottom.Width = Me.Width - 20
  507.     PMenu.Width = Me.Width - 276
  508.     PStatus.Width = Me.Width - 3036
  509.     B_Exit.Left = Me.Width - 1536
  510.     ' H size and position
  511.     LPict.Width = VT.Left - tx - 120
  512.     RPict.Left = VT.Left + 120 - tx
  513.     RPict.Width = Me.Width - RPict.Left - 160
  514.     LText.Width = LPict.Width
  515.     RText.Width = RPict.Width
  516.     RText.Left = RPict.Left
  517.     ' V size and position
  518.     LPict.Height = VT.Height - 2 * ty
  519.     RPict.Height = LPict.Height
  520.     LText.Top = VB.Top + ty
  521.     LText.Height = Me.Height - LText.Top - 1200
  522.     RText.Top = LText.Top
  523.     RText.Height = LText.Height
  524. End Sub
  525. Sub VB_DblClick ()
  526.     ' This is to compensate for the extra MouseUp event that
  527.     ' is triggered when the user doubleclicks on the splitter.
  528.     ' (The rectangle must be drawn an even number of times.)
  529.     DrawOutline Vrct, Me
  530. End Sub
  531. Sub VB_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  532.     OKtoDraw = True
  533.     Vrct.Left = VB.Left
  534.     Vrct.Top = VT.Top
  535.     Vrct.right = Vrct.Left + VB.Width
  536.     Vrct.bottom = Vrct.Top + VB.Height + C.Height + VT.Height
  537.     DrawOutline Vrct, Me
  538.     SplitInitLeft = VB.Left
  539.     InitX = X
  540. End Sub
  541. Sub VB_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  542.     Status = "VB help"
  543.     If OKtoDraw Then
  544.         DrawOutline Vrct, Me
  545.         Vrct.Left = SplitInitLeft + X - InitX
  546.         If Vrct.Left < MinL Then Vrct.Left = MinL
  547.         If Vrct.Left > MaxR Then Vrct.Left = MaxR
  548.         Vrct.right = Vrct.Left + VB.Width
  549.         DrawOutline Vrct, Me
  550.     End If
  551. End Sub
  552. Sub VB_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  553.     DrawOutline Vrct, Me
  554.     OKtoDraw = False
  555.     VT.Left = Vrct.Left
  556.     VB.Left = VT.Left
  557.     C.Left = VT.Left
  558.     HL.Width = VT.Left - HL.Left
  559.     HR.Width = HR.Width + SplitInitLeft - VT.Left
  560.     HR.Left = VT.Left + VT.Width
  561.     ReSizeMe
  562.     OutlineControl Me, LText, 1, -1
  563.     OutlineControl Me, RText, 1, -1
  564.     OutlineControl Me, LPict, 1, -1
  565.     OutlineControl Me, RPict, 1, -1
  566. End Sub
  567. Sub VT_DblClick ()
  568.     ' This is to compensate for the extra MouseUp event that
  569.     ' is triggered when the user doubleclicks on the splitter.
  570.     ' (The rectangle must be drawn an even number of times.)
  571.     DrawOutline Vrct, Me
  572. End Sub
  573. Sub VT_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  574.     OKtoDraw = True
  575.     Vrct.Left = VT.Left
  576.     Vrct.Top = VT.Top
  577.     Vrct.right = Vrct.Left + VT.Width
  578.     Vrct.bottom = Vrct.Top + VT.Height + C.Height + VB.Height
  579.     DrawOutline Vrct, Me
  580.     SplitInitLeft = VT.Left
  581.     InitX = X
  582. End Sub
  583. Sub VT_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  584.     Status = "VT help"
  585.     If OKtoDraw Then
  586.         DrawOutline Vrct, Me
  587.         Vrct.Left = SplitInitLeft + X - InitX
  588.         If Vrct.Left < MinL Then Vrct.Left = MinL
  589.         If Vrct.Left > MaxR Then Vrct.Left = MaxR
  590.         Vrct.right = Vrct.Left + VT.Width
  591.         DrawOutline Vrct, Me
  592.     End If
  593. End Sub
  594. Sub VT_MouseUp (Button As Integer, Shift As Integer, X As Single, Y As Single)
  595.     DrawOutline Vrct, Me
  596.     OKtoDraw = False
  597.     VT.Left = Vrct.Left
  598.     VB.Left = VT.Left
  599.     C.Left = VT.Left
  600.     HL.Width = VT.Left - HL.Left
  601.     HR.Width = HR.Width + SplitInitLeft - VT.Left
  602.     HR.Left = VT.Left + VT.Width
  603.     ReSizeMe
  604.     OutlineControl Me, LText, 1, -1
  605.     OutlineControl Me, RText, 1, -1
  606.     OutlineControl Me, LPict, 1, -1
  607.     OutlineControl Me, RPict, 1, -1
  608. End Sub
  609.